package org.jc.subject.common.enums;

import lombok.Getter;

/**
 * 功能描述
 *
 * @author wanghongqian
 * @date 2024/06/24 22:28
 */
@Getter
public enum SubjectInfoTypeEnum {

    RADIO(1,"单选"),
    MULTIPLE(2,"多选"),
    JUDGE(3,"判断"),
    BRIEF(4,"简答");

    public int code;

    public String desc;

    SubjectInfoTypeEnum(int code,String desc){
        this.code = code;
        this.desc = desc;
    }

    public static SubjectInfoTypeEnum getByCode(int code){
        for(SubjectInfoTypeEnum codeEnum:SubjectInfoTypeEnum.values()){
            if(codeEnum.getCode() == code){
                return codeEnum;
            }
        }
        return null;
    }

}
